// 定义一些路由
// 每个路由都需要映射到一个组件。
import Index from "../pages/Index.vue";
import Team from "../pages/TeamPage.vue";
import User from "../pages/UserPage.vue";
import SearchPage from "../pages/SearchPage.vue";
import UserEditPage from "../pages/UserEditPage.vue";
import SearchResultPage from "../pages/SearchResultPage.vue";
import UserLoginPage from "../pages/UserLoginPage.vue";
import TeamAddPage from "../pages/TeamAddPage.vue";
import TeamUpdatePage from "../pages/TeamUpdatePage.vue";
import UserUpdatePage from "../pages/UserUpdatePage.vue";
import UserTeamJoinPage from "../pages/UserTeamJoinPage.vue";
import UserTeamCreatePage from "../pages/UserTeamCreatePage.vue";
import UserRegisterPage from "../pages/UserRegisterPage.vue";
import picPage from "../pages/picPage.vue";
import tag from "../pages/UpdateTags.vue";
import PrivatePage from "../pages/UserTeamPrivatePage.vue";
import TeamDetailPage from "../pages/TeamDetailPage.vue";

//定义路由
const routes = [
    { path: '/', component: Index },
    { path: '/team', title:'队伍', component: Team },
    { path: '/team/add', title:'创建队伍', component: TeamAddPage },
    { path: '/team/update', title:'更新队伍', component: TeamUpdatePage },
    {path: '/team/detail', title: '队伍详情', component: TeamDetailPage},
    { path: '/user', title:'个人信息', component: User },
    { path: '/search', title:'找伙伴', component: SearchPage },
    { path: '/user/edit', title:'编辑信息', component: UserEditPage },
    { path: '/user/list', title:'用户列表', component: SearchResultPage },
    { path: '/user/login', title:'登录', component: UserLoginPage, meta: {showNav: true} },
    { path: '/user/register', title: '注册', component: UserRegisterPage, meta: {showNav: true} },
    { path: '/user/update', title: '当前信息', component: UserUpdatePage },
    { path: '/user/team/join', title: '加入的队伍', component: UserTeamJoinPage },
    { path: '/user/team/create', title: '创建的队伍', component: UserTeamCreatePage },
    { path: '/user/team/private', title: '私有队伍', component: PrivatePage },
    { path: '/user/picPage', title: '修改头像', component: picPage },
    { path: '/user/updateTags', title: '修改标签', component: tag },
]

//导出
export default routes;